<html encoding="UTF-8">
<link href='../../insumos/Scripts/styles.css' rel='stylesheet' type='text/css' />
<div id='midiv5'></div>
<br>
<table width="80%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30" colspan="3" background="/insumos/img/fondo1.jpg" class="texto f18"><div align="right"><strong>PRODUCTO - Actualizar Stock &nbsp;&nbsp;</strong></div></td>
  </tr>
  <tr>
    <td height="20" colspan="3">&nbsp;</td>
  </tr>
  
</table>

<p align="center"><?php echo form_remote_tag("producto/insertarstock","update: midiv5") ?></p>
<table width="50%"  border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#EFEFEF">
<tr>
    <td height="30" valign="top" background="/insumos/img/fondo1.jpg"><div align="center" class="texto">
      <strong>Rubro:</strong> 
	  <select name="select" id='rubro_id' >
        <option>Seleccione un...</option>
        <? foreach($Rubro->find("order: nombre asc") as $rubro): ?>
        <option value='<?php echo $rubro->id; ?>'> <?php echo utf8_encode($rubro->nombre); ?></option>
        <? endforeach; ?>
      </select>
    </div>    </td>
    
    <td valign="top" background="/insumos/img/fondo1.jpg"><div id='div_producto'></div> </td>
</tr>  
<tr>
  <td colspan="2" bgcolor="#FFFFFF">&nbsp;</td>
</tr>
<tr>
    <td colspan="2"><br>
    <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" class="texto">
   
      <tr>
        <td bgcolor="#FFFFFF"><div align="right"><strong>Cantidad:&nbsp;&nbsp;</strong></div></td>
        <td bgcolor="#FFFFFF"><?php echo text_field_tag("cant_prod") ?></td>
      </tr>
      
      
      <td>&nbsp; </td>
	  <td>&nbsp;</td>
	  
            </tr>
      <tr>
        <td colspan="2" bgcolor="#006699"><div align="center"><?php echo submit_tag("Agregar Stock") ?></div></td>
		</tr>
    </table>
      <br>
    <?php echo end_form_tag() ?></td>
  </tr>
</table>
</html>

<script type="text/javascript">
 new Event.observe("rubro_id", "change", function(){
 new AJAX.viewRequest({
 action: "producto/obtener_productos/"+$F("rubro_id"),
 container: "div_producto"
 })
 })
</script>